package com.example.demo.permission.user.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.example.demo.permission.role.pojo.Role;
import com.example.demo.permission.user.pojo.LtUser;

@Mapper
public interface LtUserMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(LtUser record);

	int insertSelective(LtUser record);

	LtUser selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(LtUser record);

	int updateByPrimaryKey(LtUser record);

	LtUser loadUserByUsername(String username);

	List<Role> getRolesByHrId(Long id);

	int hrReg(@Param("username") String username, @Param("password") String password);

	List<LtUser> getHrsByKeywords(@Param("keywords") String keywords);

	List<LtUser> getAllHr(@Param("currentId") Long currentId);

	int addRolesForHr(@Param("hrId") Long hrId, @Param("rids") Long[] rids);

	LtUser getHrById(Long hrId);

	int deleteRoleByHrId(Long hrId);

	int deleteHr(Long hrId);
}